<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        ul {
            list-style: none;
        }

        .container {
            margin: 20px auto;
            width: 400px;
            height: 30px;
            line-height: 30px;
            overflow: hidden;
            background-color: #0f0;
            text-align: center;
        }
        ul li{
            height:30px;
            line-height: 30px;
        }
    </style>

</head>

<body>
    <div class="container">
        <ul>
            <li>iPhone 8开机后运行应用播放视频是啥样？震撼</li>
            <li>MIUI历代图标汇总：最大的变化是它</li>
            <li>尼康D850定性大猜想：会是大D810还是小D5？</li>
            <li>六要点助你入门室内建筑摄影 传佳能或发多款移轴镜头</li>
            <li>消费者报告撤销Surface推荐 惠普三倍补偿</li>
        </ul>
    </div>
    <script src="js/jquery1.7.js"></script>
    <script>
      var height=$("ul li").first().height();
      console.log(height);
      var len=$("ul li").length;
      $("ul").height(height*len);
      setInterval(() => {
        $("ul").animate({marginTop:-height},1000,function(){
          $("ul li").first().appendTo($("ul"));//将第一个拼接到ul后面
          $("ul").css({marginTop:0});
      })
      }, 2000);
    </script>
</body>

</html>